package com.example.nacos_client;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RefreshScope
public class Conn {

    //此值在 nacos配置中心里面
    @Value("${hello}")
    private String name;

    @RequestMapping(value = "/hainacos",method = RequestMethod.GET)
    public String hello(){
        return "is ribben 2 hello world nacos1："+name;
    }
}
